﻿using Furion.DatabaseAccessor;
using Furion.DependencyInjection;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Furion.CMS.Core.Permission
{
    /// <summary>
    /// 权限定义入口
    /// </summary>
    public abstract class PermissionDefinitionProvider : IPermissionDefinitionProvider, ITransient
    {
        /// <summary>
        /// 定义权限前处理
        /// </summary>
        /// <param name="context"></param>
        public virtual void PreDefine(IPermissionDefinitionContext context)
        {

        }

        /// <summary>
        /// 定义权限
        /// </summary>
        /// <param name="context"></param>
        public abstract void Define(IPermissionDefinitionContext context);

        /// <summary>
        /// 定义权限后处理
        /// </summary>
        /// <param name="context"></param>
        public virtual void PostDefine(IPermissionDefinitionContext context)
        {

        }
    }
}
